/*账单明细
 * 2017-11-17
 * rangweiruning
 *
 */

$(function(){
	 var urlApi = 'https://jindi163.com:8443/JDLot/admin/paynum/total';
		var phone=sessionStorage.getItem("phone");
	 	runings()
	 	var times=setInterval(runings(),10000)
	 function runings(){
	 	$.ajax({
	 		type:"post",
	 		url:urlApi,
            async:true,
			dataType:'json', 
			contentType:"application/json",
			data:{},
			xhrFields: {
   						 withCredentials: true
						},
					crossDomain: true,
            success:function(data){
            	console.log(data)
            	var one1=(data.today).toFixed(2);
            	var one2=(data.yesterday).toFixed(2);
            	var one3=(data.thisWeek).toFixed(2);
            	var one4=(data.lastWeek).toFixed(2);
            	var one5=(data.thisMonth).toFixed(2);
            	var one6=(data.lastMonth).toFixed(2);
            	var one7=(data.thisYear).toFixed(2);
            	$("#zhangdan").empty();
            	var html='<ol class="shouru"><li>'+
							'<span>今日收入</span>'+
							'<span>昨日收入</span>'+
							'<span>本周收入</span>'+
							'<span>上周收入</span>'+
							'<span>本月收入</span>'+
							'<span>上月收入</span>'+
							'<span>今年收入</span>'+
						'</li>';
					 html+='<li>'+
							'<span>'+one1+'</span>'+
							'<span>'+one2+'</span>'+
							'<span>'+one3+'</span>'+
							'<span>'+one4+'</span>'+
							'<span>'+one5+'</span>'+
							'<span>'+one6+'</span>'+
							'<span>'+one7+'</span>'+
							'</li></ol>';
						$("#zhangdan").append(html);
						
            	
            }
	 	})
	 }
})